import type { ChangePasswordDto, MainOutputModel, UserDto, UserResultDto } from '@/models/user';
import { httpApi } from '@/utils/axios/http';
import url from '@/utils/axios/url';

export function getMainOutputModelApi(): Promise<MainOutputModel> {
    return httpApi.httpGet({ url: url.main });
}

export function changePasswordApi(input: ChangePasswordDto): Promise<UserResultDto> {
    return httpApi.httpPut({ url: url.main + '/changePassword', params: input });
}

export function updateUserApi(input: UserDto): Promise<UserResultDto> {
    return httpApi.httpPut({ url: url.main + '/updateUser', params: input });
}